home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_315 / surf / readme.txt < prev    next >
Text File  |  1992-05-06  |  10KB  |  247 lines

  1. Program: BezSurf Release 2
  2. Author: Eric Davies
  3.  
  4. Changes:
  5.     1) I've added the ability to write out data files that can be
  6.     translated to input files for various 3d modelling programs.
  7.  
  8.     2) Leonard Norrgaard did a very nice job of adding the capability
  9.     to modify the endpoints of segments.
  10.  
  11.     3) Increased the number of grey shades available.
  12.  
  13. Distribution
  14. ------------
  15. BezSurf is public domain. Feel free to copy it, enchance it, or port it to other
  16. machines, etc. If you liked it, included it in some PD disk distribution or
  17. what not, maybe send me a post card, its real boost to the ego, especially those
  18. from overseas.
  19.  
  20. Compilation
  21. -----------
  22. Compiled under Lattice C 5.04 with the help of Jim Uhle
  23. Will also compile under Aztec 3.4a and up.
  24.  
  25. Software Disclaimer
  26. -------------------
  27. This software is free and hence comes with no guarantees.
  28. It has always worked pretty reliably for me, but since I
  29. wrote it, thats not saying much. There was some problem that
  30. seemed to go away with AmigaDos 1.2 (very embarrassing, especially
  31. since it never happened to me, probably memory shortage problems).
  32.  
  33.  
  34. Document Disclaimer
  35. -------------------
  36. This document gives a partial description of BezSurf and its use. Many
  37. of the menu-items and gadgets are not described here. I believe most people
  38. will discover their purpose without too much trouble. If I'm wrong, you can
  39. query me by email (at least for a little while) at:
  40.  
  41.                  edavies@sol.UVic.ca
  42.                  edavies@uvunix.bitnet
  43.  
  44. (I discovered that previous address of edavies@uvvm.bitnet didn't work)
  45.  
  46. Or by snail mail (if some part of Canada Post is not on strike) at:
  47.       Eric Davies
  48.       214-4026 Quadra St.
  49.       Victoria, B.C.
  50.       Canada
  51.       V8X 4E3
  52.  
  53. I've just finished my Masters, and have no idea how long my university
  54. accounts are going to hang around. If you don't get a response, or your
  55. mail bounces, when using email, try the snail mail address. But please
  56. include an email address since I can probably reply using a friends 
  57. account.
  58.  
  59. Description
  60. -----------
  61. BezSurf (or Surf for short) is a program for producing bezier surfaces of
  62. revolution. It produces awesome pictures of wineglasses and doorknobs, and
  63. other objects one could turn on a lathe. BezSurf includes the capacity to
  64. map iff image files onto any surface that it can draw.
  65.  
  66. History
  67. -------
  68. I originally wrote BezSurf for my final project in an introductory course
  69. in computer graphics at the University of Victoria. The target machine
  70. was a colour Sun Work Station. Being a loyal amigoid, I ported it down to
  71. the Amiga when I had a bit more free time, the Late Night Developers
  72. supplying resources and technical assistence as needed. I proudly claim any
  73. errors or bugs as my own, following the lead of a certain wine glass
  74. manufacturer, "the minute flaws in the product are your guarantee of its
  75. handcrafted nature".
  76.  
  77. Back in January of 89, Leonard Noorgaard of Finland, mailed me a diff file
  78. that added the ability to edit the endpoints of line segments. This file
  79. reached me at least two months later (the edavies@uvvm.bitnet address
  80. turned out to be a semi-blackhole), whereupon I added it to some other
  81. changes of mine.
  82.  
  83. Of course, the whole thing got shelved for a long while when I started
  84. writing my thesis...
  85.  
  86. Basic Usage
  87. -----------
  88. I always run it from the Cli, but I've seen it run from the workbench
  89. without any problems.
  90.  
  91.     1)  press "lines".
  92.         press and hold down the left mouse button.
  93.         move the mouse someplace else and release the button.
  94.         a line should have been rubber banded and left on the screen.
  95.         repeat as desired {
  96.             press and drag the mouse to define new line connected to
  97.             last one line.
  98.         }
  99.  
  100.     2)  press "curves".
  101.         the endpoints of the first line should be bracked by squares.
  102.         repeat as desired {
  103.             bring the left mouse button near one of squares.
  104.             press left button, move to new location, and release left button.
  105.             nearest square should have accompanied mouse, causing the
  106.             line to curve in strange and wonderful ways.
  107.             press right button to move the next line.
  108.         }
  109. Note: the ability to edit the end points has "enhanced" step 2 slightly,
  110.       but it is a very intuitive enhancement.
  111.  
  112.     3)  press "panel"
  113.         takes you to the control panel, so you can change the lighting, save
  114.         files, etc. It is suggested that you try "tilt" with about 20
  115.         degrees ( adds a more 3d effect ).
  116.         to get back to display, press [display] on the control panel.
  117.  
  118.     4)  press "wire"
  119.         generates wireframe with hidden line removal.
  120.  
  121.     5)  press "shade"
  122.         generates shaded image with hidden surface removal.
  123.  
  124.     6)  saving the images you created is done via the "files" menu in the
  125.         control panel.
  126.             save as... saves the ilbm to the specfied file name
  127.             save first... tacks on a ".0" to the file name and saves
  128.             save next... tacks on an ascending number and saves
  129.         "save first" and "save next" are provided in case somebody wants to
  130.         try producing animation sequences with Surf.
  131.  
  132.     7)  Anything else, excluding maps, should be self apparent with a little bit
  133.         of experimentation.
  134.  
  135. Error Messages
  136. --------------
  137. Error messages are displayed in a requestor. If displayed, you must click
  138. in the requestor's close box to continue. The messages usually indicate
  139. that your file name is wrong, screwy file contents, you don't have enough
  140. memory, etc.
  141.  
  142. Aborting a time consuming activity
  143. ----------------------------------
  144. Under the "Image" menu, the "abort" item will terminate any drawing in
  145. progress.
  146.  
  147. Mapping Iff images onto Surfaces (Grey Scale Result)
  148. --------------------------------
  149. This is my answer to photon paints mapping of images onto spheres, cones,
  150. etc. Before you can perform the mapping, you need two things: (1) a loaded
  151. map image, and (2) a surface { not necessarily in that order though its
  152. probably better to load the image first if you are not sure you have enough
  153. memory }.
  154.  
  155.     Loading the map image:
  156.         Go to the control panel window (see earlier discussion).
  157.         Under the files menu, select the "Open Map" item.
  158.         Enter the pathname of an ilbm image file (note:Ehb not supported).
  159.         Wait until the hourglass goes away.
  160.  
  161. Now, go and define a surface if you haven't already. Once you have both a
  162. surface defined and an image file loaded, click on the "Map" gadget on the
  163. display screen. Be prepared to wait an hour or two for your image to
  164. be produced, it is very slow.
  165.  
  166. Using lots of bezier and revolution slices (ie, very small patches) results
  167. in images that look less scarred.
  168.  
  169. The "MapRevV" and "MapRevH" sliders determine how many times the map image is
  170. replicated on the surface.
  171.  
  172. Closing the map file frees up the memory used to store the map image file.
  173. Openning a new map file automatically closes the old one.
  174.  
  175. Mapping Iff images onto Surfaces (Colour Result)
  176. --------------------------------
  177. The idea here is to produce three different image files, one that contains
  178. the red component, one the green, and one the blue. After the files are
  179. produced, use the mergergb tool to combine them into a single file for use
  180. by the RAY2 program available from the QRT (public domain) package or DBW
  181. (shareware).
  182.  
  183. procedure: set interlace and lores screen.
  184.            set the grey model to "R only"
  185.            load the iff image file
  186.            set the screen color to "Red" (or grey).
  187.            Generate the surface mapping.
  188.            Save with a ".r" extension.
  189.            set the grey model to "G only"
  190.            load the iff image file again
  191.            set the screen color to "Green" (or grey).
  192.            Generate the surface mapping.
  193.            Save with a ".g" extension.
  194.            set the grey model to "B only".
  195.            load the iff image file again.
  196.            set the screen color to "Blue" (or grey).
  197.            Generate the surface mapping.
  198.            Save with a ".b" extension.
  199.  
  200.            now run the mergergb program with the filename without extensions
  201.            as the sole argument. Ie, if you named the files smith.r, smith.g,
  202.            and smith.b, then type:
  203.                     mergergb smith
  204.            In this case, mergergb will produce smith.tmp, which can then be
  205.            fed into RAY2. Without other arguments, RAY2 wil produce an
  206.            interlaced ham image.
  207.  
  208.  
  209. Producing data files for Modellers
  210. ----------------------------------
  211. Construct your object. Then select the "Write Data" menu item. A list of
  212. the points in the object will be written out.
  213. The file tov3d, is a program that will convert the data file written out
  214. to something that should be acceptable by VideoScape3d. However, the
  215. resulting datafile has never been tested since I don't have VS3d.
  216. Usage of tov3d:
  217.  
  218.    tov3d  -maxx f -maxy f -maxz f [-minx f] [-miny f] [-minz f]
  219.          [-ci inside_colour] [-co outside_colour] [-o output_filename] 
  220.          inputfile
  221.  
  222.    The object is scaled to fill the bounding box described by the
  223.    min(xyz)/max(xyz) parameters [each f is a floating point number]
  224.    If min value is not given, the program uses the negative of the max value.
  225.    
  226.    If no output file is named, the string ".v3d" is appended to the name
  227.    of the input file and that is used.
  228.  
  229.    If you do not give either an inside colour or an outside colour, no
  230.    polygons will be generated.
  231.  
  232.    For instance, with
  233.       tov3d -maxx 3 -maxy 4.3 -maxz 10.0 -minx 2 2 -co 3 treedata
  234.  
  235.    the bounding box is:
  236.         X = [2, 3]
  237.         Y = [-4.3, 4.3]
  238.         Z = [-10, 10]
  239.    and the output file is treedata.v3d
  240.  
  241. A Final Comment:
  242.      The old version exists compiled for the 2500 using inline math operations.
  243.      Does it ever fly, even when mapping. Hopefully some kind soul will do the
  244.      same thing for release 2, and post it.
  245.  
  246. The Future: "Son of Surf" ?
  247.